const fs = require('fs')

//异步
fs.rename('./a.json','./a.txt',(err)=>{
    if(err){
        throw err
    }
    console.log('修改成功');
})